#ifndef HEARTBEATWORKER_H
#define HEARTBEATWORKER_H

#include <atomic>

#include "Poco/Runnable.h"

#include "./Common.h"
#include "./SessionManager.h"

namespace Reactor
{

class MOUDLE_API HeartBeatWorker : public Poco::Runnable
{
public:
	HeartBeatWorker(std::shared_ptr<SessionManager> _pSessionManager, const HeartbeatOp& _heartbeatop);
	void stop();

protected:
	virtual void run() override;

private:
	std::atomic_bool _stop{ false };
	const HeartbeatOp _heartbeatop;
	std::shared_ptr<SessionManager> _pSessionManager{ nullptr };
};

}

#endif // !HEARTBEATWORKER_H
